package com.supersonic.backend.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.google.common.base.Strings;

@Entity
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
@Table(name="commonUser")
public class CommonUser extends User {
	
	@OneToMany(cascade={CascadeType.ALL},fetch=FetchType.LAZY)
	private List<Address> addresses = new ArrayList<Address>();

	@OneToMany(cascade={CascadeType.ALL},fetch=FetchType.LAZY)
	private List<AcquaintedDeliver> acquainted = new ArrayList<AcquaintedDeliver>();

	/**
	 * @return the addresses
	 */
	public List<Address> getAddresses() {
		return addresses;
	}

	/**
	 * @param addresses the addresses to set
	 */
	public void setAddresses(List<Address> addresses) {
		this.addresses = addresses;
	}

	/**
	 * @return the acquainted
	 */
	public List<AcquaintedDeliver> getAcquainted() {
		return acquainted;
	}

	/**
	 * @param acquainted the acquainted to set
	 */
	public void setAcquainted(List<AcquaintedDeliver> acquainted) {
		this.acquainted = acquainted;
	}

}
